Method and apparatus for currency discrimination and counting

ABSTRACT

An improved method and apparatus for discriminating between currency bills of different denominations uses an optical sensing and correlation technique based on the sensing of bill reflectance characteristics obtained by illuminating and scanning a bill along its narrow dimension. A series of detected reflectance signals are obtained by sampling and digitally processing, under microprocessor control, the reflected light at a plurality of predefined sample points as a currency bill is moved across an illuminated strip with its narrow dimension parallel to the direction of transport of the bill. The sample data is subjected to digital processing, including a normalizing process, whereby the reflectance data represents a characteristic pattern that is unique for a given bill denomination and incorporates sufficient distinguishing features between characteristic patterns for discriminating between different currency denominations. A plurality of master characteristic patterns are generated and stored using original bills for each denomination of currency to be detected. The pattern generated by scanning a bill under test and processing the data samples is compared with each of the prestored master patterns to generate, for each comparison, a correlation number representing the extent of similarity between corresponding ones of the plurality of data samples for the compared patterns. Denomination identification is based on designating the scanned bill as belonging to the denomination corresponding to the stored master pattern for which the correlation number resulting from pattern comparison is determined to be the highest, subject to a bi-level threshold of correlation.

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application is a continuation-in-part of pending U.S. patentapplication Ser. No. 07/475,111, filed Feb. 5, 1990, for “Method andApparatus for Currency Discrimination and Counting.”

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates, in general, to currencyidentification. The invention relates more particularly to a method andapparatus for automatic discrimination and counting of currency bills ofdifferent denominations using light reflectivity characteristics ofindicia printed upon the currency bills.

[0004] 2. Description of the Related Art

[0005] A variety of techniques and apparatus have been used to satisfythe requirements of automated currency handling systems. At the lowerend of sophistication in this area of technology are systems capable ofhandling only a specific type of currency, such as a specific dollardenomination, while rejecting all other currency types. At the upper endare complex systems which are capable of identifying and discriminatingamong and automatically counting multiple currency denominations.

[0006] Currency discrimination systems typically employ either magneticsensing or optical sensing for discriminating between different currencydenominations. Magnetic sensing is based on detecting the presence orabsence of magnetic ink in portions of the printed indicia on thecurrency by using magnetic sensors, usually ferrite core-based sensors,and using the detected magnetic signals, after undergoing analog ordigital processing, as the basis for currency discrimination. The morecommonly used optical sensing technique, on the other hand, is based ondetecting and analyzing variations in light reflectance ortransmissivity characteristics occurring when a currency bill isilluminated and scanned by a strip of focused light. The subsequentcurrency discrimination is based on the comparison of sensed opticalcharacteristics with prestored parameters for different currencydenominations, while accounting for adequate tolerances reflectingdifferences among individual bills of a given denomination.

[0007] A major obstacle in implementing automated currencydiscrimination systems is obtaining an optimum compromise between thecriteria used to adequately define the characteristic pattern for aparticular currency denomination, the time required to analyze test dataand compare it to predefined parameters in order to identify thecurrency bill under scrutiny, and the rate at which successive currencybills may be mechanically fed through and scanned. Even with the use ofmicroprocessors for processing the test data resulting from the scanningof a bill, a finite amount of time is required for acquiring samples andfor the process of comparing the test data to stored parameters toidentify the denomination of the bill.

[0008] Most of the optical scanning systems available today utilizecomplex algorithms for obtaining a large number of reflectance datasamples as a currency bill is scanned by an optical scanhead and forsubsequently comparing the data to corresponding stored parameters toidentify the bill denomination. Conventional systems require arelatively large number of optical samples per bill scan in order tosufficiently discriminate between currency denominations, particularlythose denominations for which the reflectance patterns are not markedlydistinguishable. The use of the large number of data samples slows downthe rate at which incoming bills may be scanned and, more importantly,requires a correspondingly longer period of time to process the data inaccordance with the discrimination algorithm.

[0009] A major problem associated with conventional systems is that, inorder to obtain the required large number of reflectance samplesrequired for accurate currency discrimination, such systems arerestricted to scanning bills along the longer dimension of currencybills. Lengthwise scanning, in turn, has several inherent drawbacksincluding the need for an extended transport path for relaying the billlengthwise across the scanhead and the added mechanical complexityinvolved in accommodating the extended path as well as the associatedmeans for ensuring uniform, non-overlapping registration of bills withthe sensing surface of the scanhead.

[0010] The end result is that systems capable of accurate currencydiscrimination are costly, mechanically bulky and complex, and generallyincapable of both currency discrimination and counting at high speedswith a high degree of accuracy.

SUMMARY OF THE INVENTION

[0011] It is a principal object of the present intention to provide animproved method and apparatus for identifying and counting currencybills comprising a plurality of currency denominations.

[0012] It is another object of this invention to provide an improvedmethod and apparatus of the above kind which is capable of efficientlydiscriminating among and counting bills of several currencydenominations at a high speed and with a high degree of accuracy.

[0013] A related object of the present invention is to provide such animproved currency discrimination and counting apparatus which iscompact, economical, and has uncomplicated construction and operation.

[0014] Briefly, in accordance with the present invention, the objectivesenumerated above are achieved by means of an improved optical sensingand correlation technique adopted to both counting and denominationdiscrimination of currency bills. The technique is based on opticalsensing of bill reflectance characteristics obtained by illuminating andscanning a bill along its narrow dimension, approximately about thecentral section or the bill. Light reflected from the bill as it isoptically scanned is detected and used as an analog representation ofthe variation in the dark and light content of the printed pattern orindicia on the bill surface.

[0015] A series of such detected reflectance signals are obtained bysampling and digitally processing, under microprocessor control, thereflected light at a plurality of predefined sample points as the billis moved across the illuminated strip with its narrow dimension parallelto the direction of transport of the bill. Accordingly, a fixed numberof reflectance samples is obtained across the narrow dimension of thenote. The data samples obtained for a bill scan are subjected to digitalprocessing, including a normalizing process to deaccentuate variationsdue to “contrast” fluctuations in the printed pattern or indiciaexisting on the surface of the bill being scanned. The normalizedreflectance data represent a characteristic pattern that is fairlyunique for a given bill denomination and incorporates sufficientdistinguishing features between characteristic patterns for differentcurrency denominations so as to accurately differentiate therebetween.

[0016] By using the above approach, a series of master characteristicpatterns are generated and stored using standard bills for eachdenomination of currency that is to be detected. The “standard” billsused to generate the master characteristic patterns are preferably billsthat are slightly used bills. According to a preferred embodiment, twocharacteristic patterns are generated and stored within system memoryfor each detectable currency denomination. The stored patternscorrespond, respectively, to optical scans performed on the greensurface of a bill along “forward” and “reverse” directions relative tothe pattern printed on the bill. For bill which produce significantpattern changes when shifted slightly to the left or right, such as the$10 bill in U.S. currency, it is preferred to store two patterns foreach of the “forward” and “reverse” directions, each pair of patternsfor the same direction represent two scan areas that are slightlydisplaced from each other along the long dimension of the bill.Preferably, the currency discrimination and counting method andapparatus of this invention is adapted to identify seven (7) differentdenominations of U.S. currency, i.e., $1, $2, $5, $10, $20, $50 and$100. Accordingly, a master set of 16 different characteristic patternsis stored within the system memory for subsequent correlation purposes(four patterns for the $10 bill and two patterns for each of the otherdenominations.

[0017] According to the correlation technique of this invention, thepattern generated by scanning a bill under test and processing thesampled data is compared with each or the 16 prestored characteristicpatterns to generate, for each comparison, a correlation numberrepresenting the extent of similarity between corresponding ones of theplurality of data samples for the compared patterns. Denominationidentification is based on designating the scanned bill as belonging tothe denomination corresponding to the stored characteristic pattern forwhich the correlation number resulting from pattern comparison isdetermined to be the highest. The possibility or a scanned bill havingits denomination mischaracterized following the comparison ofcharacteristic patterns, is significantly reduced by defining a bi-levelthreshold of correlation that must be satisfied for a “positive” call tobe made.

[0018] In essence, the present invention provides an improved opticalsensing and correlation technique for positively identifying any of aplurality of different bill denominations regardless of whether the billis scanned along the “forward” or “reverse” directions. The invention isparticularly adapted to be implemented with a system programmed to trackeach identified currency denomination so as to conveniently present theaggregate total of bills that have been identified at the end of a scanrun. Also in accordance with this invention, currency detecting andcounting apparatus is disclosed which is particularly adapted for usewith the novel sensing and correlation technique summarized above. Theapparatus incorporates an abbreviated curved transport path foraccepting currency bills that are to be counted and transporting thebills about their narrow dimension across a scanhead located downstreamof the curved path and onto a conventional stacking station where sensedand counted bills are collected. The scanhead operates in conjunctionwith an optical encoder which is adapted to initiate the capture of apredefined number of reflectance data samples when a bill (and, thus,the indicia or pattern printed thereupon) moves across a coherent stripof light focused downwardly of the scanhead.

[0019] The scanhead uses a pair of light-emitting diodes (“LED'”s)tofocus a coherent light strip of predefined dimensions and having anormalized distribution of light intensity across the illuminated area.The LED's are anguarly disposed and focus the desired strip of lightonto the narrow dimension of a bill positioned flat across the scanningsurface of the scanhead. A photo detector detects light reflected fromthe bill. The photo detector is controlled by the optical encoder toobtain the desired reflectance samples.

[0020] Initiation of sampling is based upon detection of the change inreflectance value that occurs when the outer border of the printedpattern on a bill is encountered relative to the reflectance valueobtained at the edge of the bill where no printed pattern exists.According to a preferred embodiment of this invention, illuminatedstrips of at least two different dimensions are used for the scanningprocess. A narrow strip is used initially to detect the starting pointof the printed pattern on a bill and is adapted to distinguish the thinborderline that typically marks the staring point of and encloses theprinted pattern on a bill. For the rest of the narrow dimension scanningfollowing detection of the border line of the printed pattern, asubstantially wider strip of light is used to collect the predefinednumber of samples for a bill scan the generation and storage ofcharacteristic patterns using standard notes and the subsequentcomparison and correlation procedure for classifying the scanned bill asbelonging to one of several predefined currency denominations is basedon the above-described sensing and correlation technique.

BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Other objects and advantages of the invention will becomeapparent upon reading the following detailed description in conjunctionwith the drawings in which:

[0022]FIG. 1 is a functional block diagram illustrating the conceptualbasis for the optical sensing and correlation method and apparatus,according to the system of this invention;

[0023]FIG. 1A is a diagrammatic perspective illustration of thesuccessive areas scanned during the traversing movement of a since billacross the scanhead;

[0024]FIG. 1B is a perspective view of a bill and the preferred area tobe scanned on the bill;

[0025]FIG. 1C is a diagrammatic side elevation of the scan areasillustrated in FIG. 1A, to show the overlapping relationship of thoseareas;

[0026]FIG. 2 is a block diagram illustrating a preferred circuitarrangement for processing and correlating reflectance data according tothe optical sensing and counting technique of this invention;

[0027] FIGS. 3-8A are flow charts illustrating the sequence ofoperations involved in implementing the optical sensing and correlationtechnique;

[0028] FIGS. 9A-C are graphical illustrations of representativecharacteristic patterns generated by narrow dimension optical scanningof a currency bill;

[0029] FIGS. 10A-E are graphical illustrations of the effect produced oncorrelation pattern by using the progressive shifting technique,according to an embodiment of this invention;

[0030]FIG. 11 is a perspective view showing currency discrimination andcounting apparatus particularly adapted to and embodying the opticalsensing and correlation technique of this invention;

[0031]FIG. 12 is a partial perspective view illustrating the mechanismused for separating currency bills and injecting them in a sequentialfashion into the transport path: FIG. 13 is a side view of the apparatusof FIG. 11 illustrating the separation mechanism and the transport path;

[0032]FIG. 14 is a side view of the apparatus of FIG. 11 illustratingdetails of the drive mechanism;

[0033]FIG. 15 is a top view of the currency discriminating and countingapparatus shown in FIGS. 11-14;

[0034]FIG. 16 is an exploded top perspective view of the opticalscanhead used in the system of FIGS. 1-15;

[0035]FIG. 17 is a bottom perspective view of the scanhead of FIG. 16,with the body portion of the scanhead sectioned along a vertical planepassing through the wide slit at the top of the scanhead;

[0036]FIG. 18 is a bottom perspective view of the scanhead of FIG. 16,with the body portion of the scanhead sectioned along a vertical planepassing through the narrow slit at the top of the scanhead;

[0037]FIG. 19 is an illustration of the light distribution producedabout the optical scanhead: and

[0038]FIG. 20 is a diagrammatic illustration of the location of twoauxiliary photo sensors relative to a bill passed thereover by thetransport mechanism shown in FIGS. 11-15: and

[0039] FIGS. 21-23 are flow charts illustrating the sequence ofoperations involved in various enhancements to the operating program forthe basic optical sensing and correlation process.

[0040] While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof have been shown by wayof example in the drawings and will herein be described in detail. Itshould be understood, however, that it is not intended to limit theinvention to the particular forms disclosed, but on the contrary, theintention is to cover all modifications, equivalents, and alternativesfalling within the spirit and scope of the invention as defined by theappended claims.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0041] Referring now to FIG. 1, there is shown a functional blockdiagram illustrating the optical sensing and correlation systemaccording to this invention. The system 10 includes a bill acceptingstation 12 where stacks of currency bills that need to be identified andcounted are positioned. Accepted bills are acted upon by a billseparating station 14 which functions to pick out or separate one billat a time for being sequentially relayed by a bill transport mechanism16, according to a precisely predetermined transport path, across anoptical scanhead 18 where the currency denomination of the bill isscanned, identified and counted at a rate in excess of 800 bills perminute. The scanned bill is then transported to a bill stacking station20 where bills so processed are stacked for subsequent removal.

[0042] The optical scanhead 18 comprises at least one light source 22directing a beam of coherent light downwardly onto the bill transportpath so as to illuminate a substantially rectangular light strip 24 upona currency bill 17 positioned on the transport path below the scanhead18. Light reflected off the illuminated strip 24 is sensed by aphotodetector 26 positioned directly below the strip. The analog outputof photodetector 26 is converted into a digital signal by means of ananalog-to-digital (ADC) convertor unit 28 whose output is fed as adigital input to a central processing unit (CPU) 30.

[0043] According to a feature of this invention, the bill transport pathis defined in such a way that the transport mechanism 16 moves currencybills with the narrow dimension “W” of the bills being parallel to thetransport path and the scan direction. Thus, as a bill 17 moves on thetransport path on the scanhead 18, the coherent light strip 24effectively scans the bill across the narrow dimension “W” of the bill.Preferably, the transport path is so arranged that a currency bill 17 isscanned approximately about the central section of the bill along itsnarrow dimension, as best shown in FIG. 1. The scanhead 18 functions todetect light reflected from the bill as it moves across the illuminatedlight strip 24 and to provide an analog representation of the variationin light so reflected which, in turn, represents the variation in thedark and light content of the printed pattern or indicia on the surfaceof the bill. This variation in light reflected from the narrow dimensionscanning of the bills serves as a measure for distinguishing, with ahigh degree of confidence, among a plurality of currency denominationswhich the system of this invention is programmed to handle.

[0044] A series of such detected reflectance signals are obtained acrossthe narrow dimension of the bill, or across a selected segment thereof,and the resulting analog signals are digitized under control of the CPU30 to yield a fixed number of digital reflectance data samples. The datasamples are then subjected to a digitizing process which includes anormalizing routine for processing the sampled data for improvedcorrelation and for smoothing out variations due to “contrast”fluctuations in the printed pattern existing on the bill surface. Thenormalized reflectance data so digitized represents a characteristicpattern that is fairly unique for a given bill denomination and providessufficient distinguishing features between characteristic patterns fordifferent currency denominations, as will be explained in detail below.

[0045] In order to ensure strict correspondence between reflectancesamples obtained by narrow dimension scanning of successive bills, theinitiation of the reflectance sampling process is preferably controlledthrough the CPU 30 by means of an optical encoder 32 which is linked tothe bill transport mechanism 16 and precisely tracks the physicalmovement of the bill 17 across the scanhead 18. More specifically, theoptical encoder 32 is linked to the rotary motion of the drive motorwhich generates the movement imparted to the bill as it is relayed alongthe transport path. In addition, it is ensured that positive contact ismaintained between the bill and the transport path, particularly whenthe bill is being scared by the scanhead 18. Under these conditions, theoptical encoder is capable of precisely tracking the movement of thebill relative to the light strip generated by the scanhead by monitoringthe rotary motion of the drive motor.

[0046] The output of photodetector 26 is monitored by the CPU 30 toinitially detect the presence of the bill underneath the scanhead and,subsequently, to detect the starting point of the printed pattern on thebill, as represented by the thin borderline 17B which typically enclosesthe printed indicia on currency bills. Once the borderline 17B has beendetected, the optical encoder is used to control the timing and numberof reflectance samples that are obtained from the output of thephotodetector 26 as the bill 17 moves across the scanhead 18 and isscanned along its narrow dimension.

[0047] The detection of the borderline constitutes an important step andrealizes improved discrimination efficiency since the borderline servesas an absolute reference point for initiation of sampling. If the edgeof a bill were to be used as a reference point, relative displacement ofsampling points can occur because of the random manner in which thedistance from the edge to the borderline varies from bill to bill due tothe relatively large range of tolerances permitted during printing andcutting of currency bills. As a result, it becomes difficult toestablish direct correspondence between sample points in successive billscans and the discrimination efficiency is adversely affected.

[0048] The use of the optical encoder for controlling the samplingprocess relative to the physical movement of a bill across the scanheadis also advantageous in that the encoder can be used to provide apredetermined delay following detection of the borderline prior toinitiation of samples. The encoder delay can be adjusted in such a waythat the bill is scanned only across those segments along its narrowdimension which contain the most distinguishable printed indiciarelative to the different currency denominations.

[0049] In the case of U.S. currency, for instance, it has beendetermined that the central approximately two-inch portion of currencybills, as scanned across the central section of the narrow dimension ofthe bill, provides sufficient data for distinguishing among the variousU.S. currency denominations on the basis of the correlation techniqueused in this invention. Accordingly, the optical encoder can be used tocontrol the scanning process so that reflectance samples are taken for aset period of time and only after a certain period of time has elapsedsince the borderline has been detected, thereby restricting the scanningto the desired central portion of the narrow dimension of the bill.

[0050] FIGS. 1A-1C illustrate the scanning process in more detail. As abill is advanced in a direction parallel to the narrow edges of thebill, scanning via the wide slit in the scanhead is effected along asegment S of the central portion of the bill. This segment S begins afixed distance d inboard of the border line B. As the bill traverses thescan head, a strip s of the segment S is always illuminated, and thephotodetector produces a continuous output signal which is proportionalto the intensity of the light reflected from the illuminated strip s atany given instant. This output is sampled at intervals controlled by theencoder, so that the sampling intervals are precisely synchronized withthe movement of the bill across the scanhead.

[0051] As illustrated in FIGS. 1A and 1C, it is preferred that thesampling intervals be selected so that the strips s that are illuminatedfor successive samples overlap one another. The odd-numbered andeven-numbered sample strips have been separated in FIGS. 1A and 1C tomore clearly illustrate this overlap. For example, the first and secondstrips s1 and s2 overlap each other, the second and third strips s2 ands3 overlap each other, and so on. Each adjacent pair of strips overlapeach other. In the illustrative example, this is accomplished bysampling strips that are 0.050 inch wide at 0.029 inch intervals, alonga segment S that is 1.83 inch long (64 samples).

[0052] The optical sensing and correlation technique is based upon usingthe above process to generate a series of master characteristic patternsusing standard bills for each denomination of currency that is to bedetected. According to a preferred embodiment, two or fourcharacteristic patterns are generated and stored within system memory,preferably in the form of an EPROM 34 (see FIG. 1), for each detectablecurrency denomination. The characteristic patterns for each bill aregenerated from optical scans, performed on the green surface of the billand taken along both the “forward” and “reverse” directions relative tothe pattern printed on the bill.

[0053] In adapting this technique to U.S. currency, for example,characteristic patterns are generated and stored for seven differentdenominations of U.S. currency, i.e., $1, $2, $5, $10, $20, $50 and$100. As explained previously, four characteristic patterns aregenerated for the $10 bill, and two characteristic patterns aregenerated for each of the other denominations. Accordingly, a master setof 16 different characteristic patterns is stored within the systemmemory for subsequent correlation purposes. Once the mastercharacteristic patterns have been stored, the pattern generated byscanning a bill under test is compared bv the CPU 30 with each of the 16pre-stored master characteristic patterns to generate, for eachcomparison, a correlation number representing the extent of correlation,i.e., similarity between corresponding ones of the plurality or datasamples, for the patterns being compared.

[0054] The CPU 30 is programmed to identify the denomination of thescanned bill as corresponding to the stored characteristic pattern forwhich the correlation number resulting from pattern comparison is foundto be the highest. In order to preclude the possibility ofmischaracterizing the denomination of a scanned bill, as well as toreduce the possibility of spurious notes being identified as belongingto a valid denomination, a bi-level threshold of correlation is used asthe basis for making a “positive” call, as will be explained in detailbelow.

[0055] Using the above sensing and correlation approach, the CPU 30 isprogrammed to count the number of bills belonging to a particularcurrency denomination as part of a given set of bills that have beenscanned for a given scan batch, and to determine the aggregate total ofthe currency amount represented by the bills scanned during a scanbatch. The CPU 30 is also linked to an output unit 36 which is adaptedto provide a display of the number of bills counted, the breakdown ofthe bills in terms of currency denomination, and the aggregate total ofthe currency value represented by counted bills. The output unit 36 canalso be adapted to provide a print-out of the displayed information in adesired format.

[0056] Referring now to FIG. 2, there is shown a representation, inblock diagram form, of a preferred circuit arrangement for processingand correlating reflectance data according to the system of thisinvention. As shown therein, the CPU 30 accepts and processes a varietyof input signals including those from the optical encoder 32, thephotodetector 26 and a memory unit 38, which can be an erasableprogrammable read only memory (EPROM). The memory unit 38 has storedwithin it the correlation program on the basis of which patterns aregenerated and test patterns compared with stored master programs inorder to identify the denomination of test currency. A crystal 40 servesas the time base for the CPU 30, which is also provided with an externalreference voltage V_(REF) on the basis of which peak detection of sensedreflectance data is performed, as explained in detail below.

[0057] The CPU 30 also accepts a timer reset signal from a reset unit 44which, as shown in FIG. 2A, accepts the output voltage from thephotodetector 26 and compares it, by means of a threshold detector 44A,relative to a pre-set voltage threshold, typically 5.0 volts, to providea reset signal which goes “high” when a reflectance value correspondingto the presence of paper is sensed. More specifically, reflectancesampling is based on the premise that no portion of the illuminatedlight strip (24 in FIG. 1) is reflected to the photodetector in theabsence of a bill positioned below the scanhead. Under these conditions,the output of the photodetector represents a “dark” or “zero” levelreading. The photodetector output changes to a “white” reading,typically set to have a value of about 5.0 volts, when the edge of abill firstt becomes positioned below the scanhead and falls under thelight strip 24. When this occurs, the reset unit 44 provides a “high”signal to the CPU 30 and marks the initiation of the scanning procedure.

[0058] In accordance with a feature of this invention, themachine-direction dimension of the illuminated strip of light producedby the light sources within the scanhead is set to be relatively smallfor the initial stage of the scan when the thin borderline is beingdetected. The use of the narrow slit increases the sensitivity withwhich the reflected light is detected and allows minute variations inthe “gray” level reflected off the bill surface to be sensed. This isimportant in ensuring that the thin borderline of the pattern. i.e., thestarting point of the printed pattern on the bill, is accuratelydetected. Once the borderline has been detected, subsequent reflectancesampling is performed on the basis of a relatively wider light strip inorder to completely scan across the narrow dimension of the bill andobtain the desired number of samples, at a rapid rate. The use of awider slit for the actual sampling also smooths out the outputcharacteristics of the photodetector and realizes the relatively largemagnitude of analog voltage which is essential for accuraterepresentation and processing of the detected reflectance values.

[0059] Returning to FIG. 2, the CPU 30 processes the output ofphotodector 26 through a peak detector 50 which essentially functions tosample the photodetector output voltage and hold the highest, i.e., peakvoltage value encountered after the detector has been enabled. The peakdetector is also adapted to define a scaled voltage on the basis ofwhich the pattern borderline on bills is detected. The output of thepeak detector 50 is fed to a voltage divider 54 which lowers the peakvoltage down to a scaled voltage V_(S) representing a predefinedpercentage of this peak value. The voltage V_(S) is based upon thepercentage drop in output voltage of the peak detector as it reflectsthe transition from the “high” reflectance value resulting from thescanning of the unprinted edge portions of a currency bill to therelatively lower “gray” reflectance value resulting when the thinborderline is encountered. Preferably, the scaled voltage V_(S) is setto be about 70-80 percent of the peak voltage.

[0060] The scaled voltage V_(S) is supplied to a line detector 56 whichis also provided with the incoming instantaneous output of thephotodetector 26. The line detector 56 compares the two voltages at itsinput side and generates a signal L_(DET) which normally stays “low” andgoes “high” when the edge of the bill is scanned. The signal L_(DET)goes “low” when the incoming photodetector output reaches thepre-defined percentage of the peak photodetector output up to thatpoint, as represented bv the voltage V_(S). Thus, when the signalL_(DET) goes “low”, it is an indication that the borderline of the billpattern has been detected. At this point, the CPU 30 initiates theactual reflectance sampling under control of the encoder 32 (see FIG. 2)and the desired fixed number of reflectance samples are obtained as thecurrency bill moves across the illuminated light strip and is scannedalong the central section of its narrow dimension.

[0061] When master characteristic patterns are being generated, thereflectance samples resulting from the scanning of a standard bill areloaded into corresponding designated sections within a system memory 60,which is preferably an EPROM. The loading of samples is accomplishedthrough a buffered address latch 58, if necessary. Preferably, masterpatterns are generated by scanning a standard bill a plurality of times,typically three (3) times, and obtaining the average of correspondingdata samples before storing the average as representing a masterpattern. During currency discrimination, the reflectance valuesresulting from the scanning of a test bill are sequentially compared,under control of the correlation program stored within the memory unit38, with each of the corresponding characteristic patterns stored withinthe EPROM 60, again through the address latch 58.

[0062] Referring now to FIGS. 3-7, there are shown flow chartsillustrating the sequence of operations involved in implementing theabove-described optical sensing and correlation technique or thisinvention. FIG. 3, in particular, illustrates the sequence involved indetecting the presence of a bill under the scanhead and the borderlineon the bill. This section of the system program, designated as“TRIGGER”, is initiated at step 70. At step 71 a determination is madeas to whether or not a start-of-note interrupt, which signifies that thesystem is ready to search for the presence of a bill, is set, i.e., hasoccurred. If the answer at step 71 is found to be positive, step 72 isreached where the presence of the bill adjacent the scanhead isascertained on the basis of the reset procedure described above inconnection with the reset unit 44 of FIG 2.

[0063] If the answer at step 72 is found to be positive, i.e, a bill isfound to be present, step 73 is reached where a test is performed to seeif the borderline has been detected on the basis of the reduction inpeak value to a predefined percentage thereof, which, as describedabove, is indicated by the signal L_(DET) going “low.” If the answer atstep 73 is found to be negative, the program continues to loop until theborderline has been detected. If the answer at step 72 is found to benegative, i.e., no bill is found to be present, the start-of-noteinterrupt is reset at step 74 and the program returns from interrupt atstep 75.

[0064] If the borderline is found to have been detected at step 73, step76 is accessed where an A/D completion interrupt is enabled, therebysignifying that the analog-to-digital conversion can subsequently beperformed at desired time intervals. Next, at step 77, the time when thefist reflectance sample is to be obtained is defined, in conjunctionwith the output of the optical encoder. At step 78 the capture anddigitization of the detected reflectance samples is undertaken byrecalling a routine designated as “STARTA2D” which will be described indetail below. At the completion of the digitization process, anend-of-note interrupt must occur, which resets the system for sensingthe presence of the following bill to be scanned, which is enabled atstep 79. Subsequently, at step 80 the program returns from interrupt.

[0065] If the start-of-note interrupt is not found to have occurred atstep 71, a determination is made at step 81 to see if the end-of-noteinterrupt has occurred. If the answer at 81 is negative, the programreturns from interrupt at step 85. If a positive answer is obtained at81, step 83 is accessed where the start-of-note interrupt is activatedand, at step 84, the reset unit, which monitors the presence of a bill,is reset to be ready for determining the presence of bills.Subsequently, the program returns from interrupt at step 85.

[0066] Referring now to FIGS. 4A and 4B there are shown, respectively,routines for starting the STARTA2D routine and the digitizing routineitself. In FIG. 4A, the initiation of the STARTA2D routine at step 90causes the sample pointer, which provides an indication of the samplebeing obtained and digitized at a given time, to be initialized.Subsequently, at step 91, the particular channel on which theanalog-to-digital conversion is to be performed is enabled. Theinterrupt authorizing the digitization of the first sample is enabled atstep 92 and the main program accessed again at step 93.

[0067]FIG. 4B is a flow chart illustrating the sequential procedureinvolved in the analog-to-digital conversion routine, which is designedas “A2D”. The routine is started at step 100. Next, the sample pointeris decremented at step 101 so as to maintain an indication of the numberof samples remaining to be obtained. At step 102 the digital datacorresponding to the output of the photodetector for the current sampleis read. The data is converted to its final form at step 103 and storedwithin a pre-defined memory segment as X_(IN).

[0068] Next, at step 105, a check is made to see if the desired fixednumber of samples “N” has been taken. If the answer is found to benegative, step 106 is accessed where interrupt authorizing thedigitization of the succeeding sample is enabled and the program returnsfrom interrupt at step 107 for completing the rest of the digitizingprocess. However, if the answer at step 105 is found to be positive,i.e., the desired number of samples have already been obtained, a flagindicating the see is set at step 108 and the program returns frominterrupt at step 109.

[0069] Referring now to FIG. 5, there is shown the sequential procedureinvolved in executing the routine, designated as “EXEC”, which performsthe mathematical steps involved in the correlation process. The routineis started at step 110. At step 111, all interrupts are disabled whileCPU initialization occurs. At step 112, any constants associated withthe sampling process are set and, at step 113, communications protocols,if any, for exchange of processed data and associated results, badrates, interrupt masks, etc. are defined.

[0070] At step 114, the reset unit indicating the presence of a bill isreset for detecting the presence of the first bill to be scanned. Atstep 115, the start-of-note interrupt is enabled to put the system onthe look out for the first incoming bill. Subsequently, at step 116, allother related interrupts are also enabled since, at this point, theinitialization process has been completed and the system is ready tobegin scanning bills. A check is made at step 117 to see if, in fact,all the desired number of samples have been obtained. If the answer atstep 117 is found to be negative the program loops until a positiveanswer is obtained.

[0071] In accordance with this invention, a simple correlation procedureis utilized for processing digitized reflectance values into a formwhich is conveniently and accurately compared to corresponding valuespre-stored in an identical format. More specifically, as a first step,the mean value {overscore (X)} for the set of digitized reflectancesamples (comparing “n” samples) obtained for a bill scan run is firstobtained as below: $\begin{matrix}{\overset{\_}{X} = {\sum\limits_{i = 0}^{n}\frac{X_{i}}{n}}} & (1)\end{matrix}$

[0072] Subsequently, a normalizing factor Sigma “σ” is determined asbeing equivalent to the sum of the square of the difference between eachsample and the mean, as normalized by the total number n of samples.More specifically, the normalizing factor is calculated as below:$\begin{matrix}{\sigma = {\sum\limits_{i = 0}^{n}\frac{{{X_{i} - \overset{\_}{X}}}^{2}}{n}}} & (2)\end{matrix}$

[0073] In the final step, each reflectance sample is normalized byobtaining the difference between the sample and the above-calculatedmean value and dividing it by the square root of the normalizing factorSigma “σ” as defined by the following equation: $\begin{matrix}{X_{n} = \frac{X_{i} - \overset{\_}{X}}{(\sigma)^{1/2}}} & (3)\end{matrix}$

[0074] The result of using the above correlation equations is that,subsequent to the normalizing process, a relationship of correlationexists between a test pattern and a master pattern such that theaggregate sum of the products of corresponding samples in a test patternand any master pattern, when divided by the total number of samples,equals unity if the patterns are identical. Otherwise, a value less thanunity is obtained. Accordingly, the correlation number or factorresulting from the comparison of normalized samples within a testpattern to those of a stored master pattern provides a clear indicationof the degree of similarity or correlation between the two patterns.

[0075] According to a preferred embodiment of this invention, the fixednumber of reflectance samples which are digitized and normalized for abill scan is selected to be 64. It has experimentally been found thatthe use of higher binary orders of samples (such as 128, 256, etc.) doesnot provide a correspondingly increased discrimination efficiencyrelative to the increased processing time involved in implementing theabove-described correlation procedure. It has also been found that theuse of a binary order of samples lower than 64, such as 32, produces asubstantial drop in discrimination efficiency.

[0076] The correlation factor can be represented conveniently in binaryterms for ease of correlation. In a preferred embodiment, for instance,the factor of unity which results when a hundred percent correlationexists is represented in terms of the binary number 2¹⁰, which is equalto a decimal value of 1024. Using the above procedure, the normalizedsamples within a test pattern are compared to each of the 16 mastercharacteristic patterns stored within the system memory in order todetermine the particular stored pattern to which the test patterncorresponds most closely by identifying the comparison which yields acorrelation number closest to 1024.

[0077] According to a feature of this invention, a bi-level threshold ofcorrelation is required to be satisfied before a particular call ismade, for at least certain denominations of bills. More specifically,the correlation procedure is adapted to identify the two highestcorrelation numbers resulting from the comparison of the test pattern toone of the stored patterns. At that point, a minimum threshold ofcorrelation is required to be satisfied by these two correlationnumbers. It has experimentally been found that a correlation number ofabout 850 serves as a good cut-off threshold above which positive callsmay be made with a high degree of confidence and below which thedesignation of a test pattern as corresponding to any of the storedpatterns is uncertain. As a second thresholding level, a minimumseparation is prescribed between the two highest correlation numbersbefore making a call. This ensures that a positive call is made onlywhen a test pattern does not correspond, within a given range ofcorrelation, to more than one stored master pattern. Preferably, theminimum separation between correlation numbers i set to be 150 when thehighest correlation number is between 800 and 850. When the highestcorrelation number is below 800, no call is made.

[0078] Returning now to FIG. 5, the correlation procedure is initiatedat step 119 where a routine designated as “PROCESS” is accessed. Theprocedure involved in executing this routine is illustrated at FIG. 6Awhich shows the routine starting at step 130. At step 131, the mean{overscore (X)} is calculated on the basis of Equation (1). At step 132the sum of the squares is calculated in accordance with Equation (2). Atstep 133, the digitized values of the reflectance samples, asrepresented in integer format XIN, are converted to floating pointformat XFLOAT for further processing. At step 134, a check is made tosee if ail samples have been processed and if the answer is found to bepositive, the routine ends at step 135 and the main program is accessedagain. If the answer at step 134 is found to be negative, the routinereturns to step 132 where the above calculations are repeated.

[0079] At the end of the routine PROCESS, the program returns to theroutine EXEC at step 120 where the flag indicating that all digitizedreflectance samples have been processed is reset. Subsequently, at step121, a routine designated as “SIGCAL” is accessed. The procedureinvolved in executing this routine is illustrated at FIG. 6B which showsthe routine starting at step 140. At step 141, the square root of thesum of the squares, as calculated by the routine PROCESS, is calculatedin accordance with Equation (2). At step 142, the floating point valuescalculated by the routine PROCESS are normalized in accordance withEquation (3) using the calculated values at step 141. At step 143, acheck is mad to see if all digital samples have been processed. If theanswer at step 143 is found to be negative, the program returns to step142 and the conversion is continued until all samples have beenprocessed. At that point, the answer at step 143 is positive and theroutine returns to the main program at step 144.

[0080] Returning to the flow chart of FIG. 5, the next step to beexecuted is step 122 where a routine designated as “CORREL” is accessed.The procedure involved in executing this routine is illustrated at FIG.7 which shows the routine starring at 150. At step 151, correlationresults are initialized to zero and, at step 152, the test pattern iscompared to the first one of the stored master patterns. At step 153,the first call corresponding to the highest correlation number obtainedup to that point is determined. At step 154, the second callcorresponding to the second highest correlation number obtained up tothat point is determined. At step 155, a check is made to see if thetest pattern has been compared to all master patterns. If the answer isfound to be negative, the routine reverts to step 152 where thecomparison procedure is reiterated. When all master patterns have beencompared to the test pattern, step 155 yields a positive result and theroutine returns to the main program at step 156.

[0081] Returning again to FIG. 5, step 124 is accessed where a routinedesignated as “SEROUT” is initiated. The procedure involved in executingthe routine SEROUT is illustrated at FIG. 8 which shows the routine asstarting at step 160. Step 161 determines whether the correlation numberis greater than 799. If the answer is negative, the correlation numberis too low to identify the denomination of the bill with certainty, andthus step 162 generates a “no call” code and returns to the main programat step 163.

[0082] An affirmative answer at step 161 advances the system to step164, which determines whether the correlation number is greater than849. An affirmative answer at step 164 indicates that the correlationnumber is sufficiently high that the denomination of the scanned billcan be identified with certainty without any further checking.Consequently, a “denomination” code identifying the denominationrepresented by the stored pattern resulting in the highest correlationnumber is generated at step 165, and the system returns to the mainprogram at step 163.

[0083] A negative answer at step 164 indicates that the correlationnumber is between 800 and 850. It has been found that correlationnumbers within this range are sufficient to identify $1 and $5 bills,but not other denominations of bills. Accordingly, a negative responseat step 164 advances the system to step 166 which determines whether thedifference between the two highest correlation numbers is greater than149. If the answer is affirmative, the denomination identified by thehighest correlation number is acceptable, and thus the “denomination”code is generated at step 165.

[0084] If the difference between the two highest correlation numbers isless than 150, step 166 produces a negative response which advances thesystem to step 167 to determine whether the highest correlation numberidentified the bill as either a $1-bill or a $5-bill. If the answer isaffirmative, the highest correlation number is acceptable as identifyingthe bill denomination, and thus the “denomination” code is generated atstep 165. A negative response at step 167 indicates that the bill wasnot identified as a $1-bill or a $5-bill by the highest correlationnumber, the difference between the two highest correlation numbers wasless than 150, and the highest correlation number was less then 850.This combination of conditions indicates that a positive call cannot bemade with a high degree of correspondence, and thus the “no call” codeis generated at step 162.

[0085] One problem encountered in currency recognition and countingsystems or the above-described kind is the difficulty involved ininterrupting (for a variety of reasons) and resuming the scanning andcounting procedure as a stack of bills is being scanned. If a particularcurrency recognition unit (CRU) has to be halted in operation due to a‘major” system error, such as a bill being jammed along the transportpath, there is generally no concern about the outstanding transitionalstatus of the overall recognition and counting process. However, wherethe CRU has to be halted due to a “minor’ error, such as theidentification of a scanned bill as being a counterfeit (based on avariety of monitored parameters which are not pertinent to the presentdisclosure) or a “no call” (a bill which is not identifiable asbelonging to a specific currency denomination based on the plurality ofstored master patterns and/or other criteria), it is desirable that thetransitional status of the overall recognition and counting process beretained so that the CRU may be restarted without any effectivedisruptions of the recognition/counting process.

[0086] More specifically, once a scanned bill has been identified as a“no call” bill (B₁) based on some set of predefined criteria, it isdesirable that this bill B₁ be transported directly to the systemstacker and the CRU brought to a halt with bill B₁ remaining at thetop-most stacker position while, at the same time, ensuring that thefollowing bills are maintained in positions along the bill transportpath whereby CRU operation can be conveniently resumed without anydisruption of the recognition/counting process.

[0087] Since the bill processing speeds at which currency recognitionsystems must operate are substantially high (speeds of the order ofabout 1000 bills per minute are desirable), it is practically impossibleto totally halt the system following a “no call” without the followingbill B₂ already being transported under the optical scanhead andpartially scanned. As a result, it is virtually impossible for the CRUsystem to retain the transitional status of the recognition/countingprocess (particularly with respect to bill B₂) in order that the processmay be resumed once the bad bill B₁ has been transported to the stacker,conveniently removed therefrom, and the system restarted. The basicproblem is that the CRU is halted with bill B₂ only partially scanned,there is no possibility of referencing the data reflectance samplesextracted therefrom in such a way that the scanning may be latercontinued (when the CRU is related) from exactly the same point wherethe sample extraction process was interrupted when the CRU was stopped.

[0088] Even if an attempt were made at immediately halting the CRUsystem following a “no call,” any subsequent scanning of bills would betotally unreliable because of mechanical backlash effects and theresultant disruption of the optical encoder routine used for billscanning. Consequently, when the CRU is restarted, the call for thefollowing bill is also likely to be bad and the overallrecognition/counting process is totally disrupted as a result of anendless loop of “no calls.”.

[0089] According to an important feature of the present invention, theabove problems are solved by an improved currency detecting and countingtechnique whereby a scanned bill identified as a “no call” istransported directly to the top of the system stacker and the CRU ishalted without adversely affecting the data collection and processingsteps for a succeeding bill. Accordingly, when the CRU is restarted, theoverall bill recognition and counting procedure can be resumed withoutany disruption as if the CRU had never been halted at all.

[0090] According to the improved currency detecting/counting technique,the CRU is operated in the normal fashion described above in detail,whereby an incoming bill is scanned and processed in order to make acall as to the bill denomination. If the bill is identified as a ‘nocall” based on any of a variety of conventionally defined bill criteria(such as the criteria in FIG. 8), the CRU is subjected to a controlleddeceleration process whereby the CRU operating speed, i.e., the speed atwhich test bills are moved across the system scanhead along the billtransport path, is reduced from its normal operating level. During thisdeceleration process the “no call” bill (B₁) is transported to the topof the stacker and, at the same time, the following bill B₂ is subjectedto the standard scan and processing procedure in order to identify thedenomination thereof.

[0091] The rate of deceleration is such that optical scanning of bill B₂is completed by the time the CRU operating speed is reduced to apredefined operating speed. While the exact operating speed at the endof the scanning of bill B₂ is not critical, the objective is to permitcomplete scanning of bill B₂ without subjecting it to backlash effectsthat would result if the ramping were too fast while, at the same time,ensuring that the bill B₁ has in fact been transported to the stacker inthe meantime.

[0092] It has experimentally been determined that at nominal operatingspeeds of the order of 1000 bills per minute, the deceleration ispreferably such that the CRU operating speed is reduced to aboutone-third of its normal operating speed at the end of the decelerationphase, i.e., by the time optical scanning of bill B₂ has been completed.It has been determined that at these speed levels, positive calls can bemade as to the denomination of bill B₂ based on reflectance samplesgathered during the deceleration phase with a relatively high degree ofcertainty (i.e., with a correlation number exceeding about 850.)

[0093] Once the optical scanning of bill B₂ has been completed, thespeed is reduced to an even slower speed until the bill B₂ has passedbill-edge sensors S1 and S2 described below whereby it is then broughtto a complete stop. At the same time, the results of the processing ofscanned data corresponding to bill B₂ are stored in system memory. Theultimate result of this stopping procedure is that the CRU is brought toa complete halt following the point where the scanning of bill B₂ hasbeen reliably completed since the scan procedure is not subjected to thedisruptive effects (backlash etc.) which would result if a complete haltwere attempted immediately after bill B₁ is identified as a “no call.”

[0094] More importantly, the reduced operating speed of the machine atthe end of the deceleration phase is such that the CRU can be brought toa total halt before the next following bill B₃ has been transported overthe optical scanhead. Thus, when the CRU is in fact halted, bill B₁ ispositioned at the top of the system stacker, bill B₂ is maintained intransit between the optical scanhead and the stacker after it has beensubjected to scanning, and the following bill B₃ is stopped short of theoptical scanhead.

[0095] When the CRU is restarted, presumably after corrective action hasbeen taken responsive to the “minor” error which led to the CRU beingstopped (such as the removal of the ‘no call” bill from the top of thestacker), the overall bill recognition/counting operation can be resumedin an uninterrupted fashion by using the stored call results for bill B₂as the basis for updating the system count appropriately, moving bill B₂from its earlier transitional position along the transport path into thestacker, and moving bill B₃ along the transport path into the opticalscanhead area where it can be subjected to normal scanning andprocessing. A routine for executing the deceleration/stopping proceduredescribed above is illustrated by the flow chart FIG. 8A. This routineis initiated at step 170 with the CRU in its normal operating mode. Atstep 171, a test bill B₁ is scanned and the data reflectance samplesresulting therefrom are processed. Next at step 172, a determination ismade as to whether or not test bill B₁ is a “no call” using predefinedcriteria in combination with the overall bill recognition procedure,such as the routine of FIG. 8. If the answer at step 172 is negative,i.e., the test bill B₁ can be identified, step 173 is accessed wherenormal bill processing is continued in accordance with the proceduresdescribed above. If, however, the test bill B₁ is found to be bad atstep 172, step 174 is accessed where CRU slowdown is initiated, e.g.,the transport drive motor speed is reduced to about one-third its normalspeed.

[0096] Subsequently, the bad bill B₁ is guided to the stacker while, atthe same time, the following test bill B₂ is brought under the opticalscanhead and subjected to the scanning and processing steps. The callresulting from the scanning and processing of bill B₂ is stored insystem memory at this point. Step 175 determines whether the scanning ofbill B₂ is complete. When the answer is negative, step 176 determineswhether a preselected “bill timeout” period has expired so that thesystem does not wait for the scanning of a bill that is not present. Anaffirmative answer at step 176 returns the system to the main program atstep 175 while a negative answer at step 176 causes steps 175 and 176 tobe reiterated until one of them produces an affirmative response.

[0097] An affirmative response at step 175 causes step 177 to furtherreduce the speed of the transport drive motor, i.e., one-sixth thenormal speed. Before stopping the transport drive motor, step 178determines whether either of the sensors S1 or S2 (described below) iscovered by a bill. A negative answer at step 178 indicates that the billhas cleared both sensors S2 and S2, and thus the transport drive motoris stopped at step 179. This signifies the end of thedeceleration/stopping process. At this point in time, bill B₂ remains intransit while the following bill B₃ is stopped on the transport pathjust short of the optical scanhead.

[0098] Following step 179, corrective action responsive to theidentification of a “no call” bill is conveniently undertaken; thetop-most bill in the stacker is easily removed therefrom and the CRU isthen in condition for resuming the recognition/counting process.Accordingly, the CRU can be restarted and the stored resultscorresponding to bill B₂, are used to appropriately update the systemcount. Next, the identified bill B₂ is guided along the transport pathto the stacker, and the CRU continues with its normal processingroutine.

[0099] Referring now to FIGS. 9A-C there are shown three test patternsgenerated, respective , for the forward scanning of a $1 bill along itsgreen side, the reverse scanning of a $2 bill on its green side, and theforward scanning of a $100 bill on its green side. It should be notedthat, for purposes of clarity the test patterns in FIGS. 9A-C weregenerated by using 128 reflectance samples per bill scan, as opposed tothe preferred use of only 64 samples. The marked difference existingbetween corresponding samples for these three test patterns isindicative of the high degree of confidence with which currencydenominations may be called using the foregoing optical sensing andcorrelation procedure.

[0100] The optical sensing and correlation technique described abovepermits identification of pre-programmed currency denominations with ahigh degree of accuracy and is based upon a relatively low processingtime for digitizing sampled reflectance values and comparing them to themaster characteristic patterns. The approach is used to scan currencybills, normalize the scanned data and generate master patterns in such away that bill scans during operation have a direct correspondencebetween compared sample points in portions of the bills which possessthe most distinguishable printed indicia. A relatively low number ofreflectance samples is required in order to be able to adequatelydistinguish between several currency denominations.

[0101] A major advantage with this approach is that it is not requiredthat currency bills be scanned along their wide dimensions. Further, thereduction in the number of samples reduces the processing time to suchan extent that additional comparisons can be made during the timeavailable between the scanning of successive bills. More specifically,as described above, it becomes possible to compare a test pattern withtwo or more stored master characteristic patterns so that the system ismade capable of identifying currency which is scanned in the “forward”or “reverse” directions along the green surface of the bill.

[0102] Another advantage accruing from the reduction in processing timerealized by the present sensing and correlation scheme is that theresponse time involved in either stopping the transport of a bill thathas been identified as “spurious”, i.e., not corresponding to any of thestored master characteristic patterns, or diverting such a bill to aseparate stacker bin, is correspondingly shortened. Accordingly, thesystem can conveniently be programmed to set a flag when a scannedpattern does not correspond to any of the master patterns. Theidentification of such a condition can be used to stop the billtransport drive motor for the mechanism, Since the optical encoder istied to the rotational movement of the drive motor, synchronism can bemaintained between pre- and post-stop conditions. In the dual-processorimplementation discussed above, the information concerning theidentification of a “spurious” bill would be included in the informationrelayed to the general processor unit which, in turn, would control thedrive motor appropriately.

[0103] The correlation procedure and the accuracy with which adenomination is identified directly relates to the degree ofcorrespondence between reflectance samples on the test pattern andcorresponding samples on the stored master patterns. Thus, shrinkage of“used” bills which, in turn, causes corresponding reductions in theirnarrow dimensions, can possibly produce a drop in the degree ofcorrelation between such used bills of a given denomination and thecorresponding master patterns. Currency bills which have experienced ahigh degree of usage exhibit such a reduction in both the narrow andwide dimensions of the bills. While the sensing and correlationtechnique of this invention remains relatively independent of anychanges in the wide dimension of bills, reduction along the narrowdimension can affect correlation factors by realizing a relativedisplacement of reflectance samples obtained as the “shrunk” bills aretransported across the scanhead.

[0104] In order to accommodate or nullify the effect of such narrowdimension shrinking, the above-described correlation technique can bemodified by use of a progressive shifting approach whereby a testpattern which does not correspond to any of the master patterns ispartitioned into predefined sections, and samples in successive sectionsare progressively shifted and compared again to the stored patterns inorder to identify the denomination. It has experimentally beendetermined that such progressive shifting effectively counteracts anysample displacement resulting from shrinkage of a bill along its narrowdimension.

[0105] The progressive shifting effect is best illustrated by thecorrelation patterns shown in FIGS. 10A-D. For purposes of clarity, theillustrated patterns were generated using 128 samples for each bill scanas compared to the preferred use of 64 samples. FIG. 10A shows thecorrelation between a test pattern (represented by a heavy line) and acorresponding master pattern (represented by a thin line). It is clearfrom FIG. 10A that the degree of correlation between the two patterns isrelatively low and exhibits a correlation factor of 606.

[0106] The manner in which the correlation between these patterns isincreased by employing progressive shifting is best illustrated byconsidering the correlation at the reference points designated as A-Ealong the axis defining the number of samples. The effect on correlationproduced by “single” progressive shifting is shown in FIG. 10B whichshows “single” shifting of the test pattern of FIG. 10A. This iseffected by dividing the test pattern into two equal segments eachcomprising 64 samples. The first segment is retained without any shiftwhereas the second segment is shifted by a factor of one data sample.Under these conditions, it is found that the correlation factor at thereference points located in the shifted section, particularly at pointE, is improved.

[0107]FIG. 10C shows the effect produced by “double” progressiveshifting whereby sections of the test pattern are shifted in threestages. This is accomplished by dividing the overall pattern into threeapproximately equal sized sections. Section one is not shifted, sectiontwo is shifted by one data sample (as in FIG. 10B), and section three isshifted bv a factor of two data samples. With “double” shifting, it canbe seen that the correlation factor at point E is further increased.

[0108] On a similar basis, FIG. 10D shows the effect on correlationproduced by “triple” progressive shifting where the overall pattern isfirst divided into four (4) approximately equal sized sections.Subsequently, section one is retained without any shift, section two isshifted by one data sample, section three is shifted by two datasamples, and section four is shifted by three data samples. Under theseconditions, the correlation factor at point E is seen to have increasedagain.

[0109]FIG. 10E shows the effect on correlation produced by “quadruple”shifting, where the pattern is first divided into five (5) approximatelyequal sized sections. The first four (4) sections are shifted inaccordance with the “triple” shifting approach of FIG. 10D, whereas thefifth section is shifted by a factor of four (4) data samples. From FIG.10E it is clear that the correlation at point E is increased almost tothe point of superimposition of the compared data samples.

[0110] The advantage of using the progressive shifting approach asopposed to merely shifting by a set amount of data samples across theoverall test pattern, is that the improvement in correlation achieved inthe initial sections of the pattern as a result of shifting is notneutralized or offset by any subsequent shifts in the test pattern. Itis apparent from the above figures that the degree of correlation forsample points failing within the progressively shifted sectionsincreases correspondingly.

[0111] More importantly, the progressive shifting realizes substantialincreases in the overall correlation factor resulting from patterncomparison. For instance, the original correlation factor of 606 (FIG.10A) is increased to 681 by the “single” shifting shown in FIG. 10B. The“double” shifting shown in FIG. 10C increases the correlation number to793, the “triple” shifting of FIG. 10D increases the correlation numberto 906, and, finally, the “quadruple” shifting shown in FIG. 10Eincreases the overall correlation number to 960. Using the aboveapproach, it has been determined that used currency bills which exhibita high degree of narrow dimension shrinkage and which cannot beaccurately identified as belonging to the correct currency denominationwhen the correlation is performed without any shifting, can beidentified with a high degree of certainty by using progressive shiftingapproach, preferably by adopting “triple” or “quadruple” shifting.

[0112] Referring now to FIG. 11, there is shown apparatus 210 forcurrency discrimination and counting which embodies the principles ofthe present invention. The apparatus comprises a housing 212 whichincludes left and right hand sidewalls 214 and 216, respectively, a rearwall 218, and a top surface generally designated as 220. The apparatushas a front section 222 which comprises a generally vertical forwardsection 224 and a forward sloping section 225 which includes sidesections provided with control panels 226A and 226B upon which variouscontrol switches for operating the apparatus, as well as associateddisplay means, are mounted.

[0113] For accepting a stack of currency bills 228 (FIG. 12) which haveto be discriminated according to denomination, an input bin 227 isdefined on the top surface 220 by a downwardly sloping support surface229 on which are provided a pair of vertically disposed side walls 230,232 linked together by a vertically disposed front wall 234. The walls230, 232 and 234, in combination with the sloping surface 229, define anenclosure where the stack of currency bills 228 is positioned.

[0114] From the input bin, currency bills are moved along atri-sectional transport path which includes an input path where billsare moved along a first direction in a substantially flat position, acurved guideway where bills are accepted from the input path and guidedin such a way as to change the direction of travel to a second differentdirection, and an output path where the bills are moved in a flatposition along the second different direction across currencydiscrimination means located downstream of the curved guideway, as willbe described in detail below. In accordance with the improved opticalsensing and correlation technique of this invention, the transport pathis defined in such a way that currency bills are accepted, transportedalong the input path, the curved guideway, and the output path, andstacked with the narrow dimension “W” of the bills being maintainedparallel to the transport path and the direction of movement at alltimes.

[0115] The forward sloping section 225 of the document handlingapparatus 210 includes a platform surface 235 centrally disposed betweenthe side wails 214, 216 and is adapted to accept currency bills whichhave been processed through the currency discrimination means fordelivery to a stacker plate 242 where the processed bills are stackedfor subsequent removal. More specifically, the platform 235 includes anassociated angular surface 236 and is provided with openings 237, 237Afrom which flexible blades 238A, 240A of a corresponding pair of stackerwheels 238, 240, respectively, extend outward. The stacker wheels aresupported for rotational movement about a stacker shaft 241 disposedabout the angular surface 236 and suspended across the side walls 214and 216. The flexible blades 238A, 240A of the stacker wheels cooperatewith the stacker platform 235 and the openings 237, 237A to pick upcurrency bills delivered thereto. The blades operate to subsequentlydeliver such bills to a stacker plate 242 which is linked to the angularsurface 236 and which also accommodates the stacker wheel openings andthe wheels projecting therefrom. During operation, a currency bill whichis delivered to the stacker platform 235 is picked up by the flexibleblades and becomes lodged between a pair of adjacent blades which incombination, define a curved enclosure which decelerates a bill enteringtherein and serves as a means for supporting and transferring the billfrom the stacker platform 235 onto the stacker plate 242 as the stackerwheels rotate. The mechanical configuration of the stacker wheels andthe flexible blades provided thereupon, as well as the manner in whichthey cooperate with the stacker platform and the stacker plate, isconventional and, accordingly, is not described in detail herein.

[0116] The bill handling and count apparatus 210 is provided with meansfor picking up or “stripping” currency bills, one at a time, from billsthat are stacked in the input bin 227. In order to provide thisstripping action, a feed roller 246 is rotationally suspended about adrive shaft 247 which, in turn, is supported across the side walls 214,216. The feed roller 246 projects through a slot provided on thedownwardly sloping surface 229 of the input bin 227 which defines theinput path and is in the form of an eccentric roller at least a part ofthe periphery of which is provided with a relatively highfriction-bearing surface 246A. The surface 246A is adapted to engage thebottom bill of the bill stack 228 as the roller 246 rotates; thisinitiates the advancement of the bottom bill along the feed directionrepresented bv the arrow 247B (see FIG. 13). The eccentric surface ofthe feed roller 246 essentially “jogs” the bill stack once perrevolution so as to agitate and loosen the bottom currency bill withinthe stack, thereby facilitating the advancement of the bottom bill alongthe feed direction.

[0117] The action of the feed roller 246 is supplemented by theprovision of a capstan or drum 248 which is suspended for rotationalmovement about a capstan drive shaft 249 which, in turn, is supportedacross the side wails 214 and 216. Preferably, the capstan 248 comprisesa centrally disposed friction roller 248A having a smooth surface andformed of a friction-bearing material such as rubber or hard plastic.The friction roller is sandwiched between a pair of capstan rollers 248Band 248C, at least a part of the external peripheries of which areprovided with a high fiction-bearing surface 248D.

[0118] The friction surface 248D is akin to the friction surface 246Aprovided on the feed roller and permits the capstan rollers tofrictionally advance the bottom bill along the feed direction.Preferably, the rotational movement of the capstan 248 and the feedroller 246 is synchronized in such a way that the frictional surfacesprovided on the peripheries of the capstan and the feed roller rotate inunison, thereby inducing complimentary frictional contact with thebottom bill of the bill stack 228.

[0119] In order to ensure active contact between the capstan 248 and acurrency bill which is jogged by the feed roller 246 and is in theprocess of being advanced frictionally by the capstan rollers 248B,248C, a pair of picker rollers 252A, 252B, are provided for exerting aconsistent downward force onto the leading edges of the currency billsstationed in the input bin 227. The picker rollers are supported oncorresponding picker arms 254A 254B which, in turn, are supported forarcuate movement about a support shaft 256 suspended across the sidewalls of the apparatus. The picker rollers are free wheeling about thepicker arms and when there are no currency bills in contact with thecapstan 248, bear down upon the friction roller 248A and, accordingly,are induced into counter-rotation therewith. However, when currencybills are present and are in contact with the capstan 248, the pickerrollers bear down into contact with the leading edges of the currencybills and exert a direct downward force on the bills since therotational movement of rollers is inhibited. The result is that theadvancing action brought about by contact between the friction-bearingsurfaces 248D on the capstan rollers 248B, 248C is accentuated, therebyfacilitating the stripping away of a single currency bill at a time fromthe bill stack 228.

[0120] In between the picker arms 254A, 254B, the support shaft 256 alsosupports a separator arm 260 which carries at its end remote from theshaft a stationary stripper shoe 258 which is provided with a frictionalsurface which imparts a frictional drag upon bills onto which the pickerrollers bear down. The separator arm is mounted for arcuate movementabout the support shaft 256 and is spring loaded in such a way as tobear down with a selected amount of force onto the capstan.

[0121] In operation, the picker rollers rotate with the rotationalmovement of the friction roller 248A due to their free wheeling natureuntil the leading edges of one or more currency bills are encountered.At that point, the rotational movement of the picker rollers stops andthe leading edges of the bills are forced into positive contact with thefriction bearing surfaces on the periphery of the capstan rollers. Theeffect is to force the bottom bill away from the rest of the bills alongthe direction of rotation or the capstan. At the same time, theseparator shoe 258 also bears down on any of the bills that arepropelled forward by the capstan rollers.

[0122] The tension on the picker arm 254A is selected to be such thatthe downward force exerted upon such a propelled bill allows only asingle bill to move forward. If two or more bills happen to be propelledout of the contact established between the picker rollers and thecapstan rollers, the downward force exerted bv the spring loaded shoeshould be sufficient to inhibit farther forward movement of the bills.The tension under which the picker arm is spring loaded can beconveniently adjusted to control the downward bearing force exerted bythe shoe in such a way as to compliment the bill stripping actionproduced by the picker rollers and the capstan rollers. Thus, thepossibility that more than two bills may be propelled forward at thesame time due to the rotational movement to the capstan is significantlyreduced.

[0123] The bill transport path includes a curved guideway 270 providedin front of the capstan 248 for accepting currency bills that have beenpropelled forward along the input path defined by the forward section ofthe sloping surface 229 into frictional contact with the rotatingcapstan. The guideway 270 includes a curved section 272 whichcorresponds substantially to the curved periphery of the capstan 248 soas to compliment the impetus provided by the capstan rollers 248B, 248Cto a stripped currency bill.

[0124] A pair of idler rollers 262A, 262B is provided downstream of thepicker rollers for guiding bills propelled by the capstan 248 into thecurved guideway 270. More specifically, the idler rollers are mounted oncorresponding idler arms 264A, 264B which are mounted for arcuatemovement about an idler shaft 266 which, in turn, is supported acrossthe side walls of the apparatus. The idler arms are spring loaded on theidler shaft so that a selected downward force can be exerted through theidler rollers onto a stripped bill, thereby ensuring continued contactbetween the bill and the capstan 248 until the bill is guided into thecurved section 272 of the guideway 270.

[0125] A modified feed mechanism is described in the assignee'scopending United States patent application Ser. No. 07/680,585, filedApr. 4, 1991, for “Feed Arrangement For Currency Handling Machines,”which is incorporated herein by reference.

[0126] Downstream of the curved section 272, the bill transport path hasan output path for currency bills. The output path is provided in theform of a flat section 274 along which bills which have been guidedalong the curved guideway 270 by the idler rollers 262A, 262B are movedalong a direction which is opposite to the direction along which billsare moved out of the input bin. The movement of bills along thedirection of rotation of the capstan, as induced by the picker rollers252A, 252B and the capstan rollers 248B, 248C, and the guidance providedby the section 272 of the curved guideway 270 changes the direction ofmovement of the currency bills from the initial movement along thesloping surface 229 of input bin 227 (see arrow 247B in FIG. 13) to adirection along the flat section 274 of the output path, as bestillustrated in FIG. 13 by the arrow 272B.

[0127] Thus, a currency bill which is stripped from the bill stack inthe input bin is initially moved along the input path under positivecontact between the picker rollers 252A, 252B and the capstan rollers248B, 248C. Subsequently, the bill is guided through the curved guideway270 under positive contact with the idler rollers 262A, 262B onto theflat section 274 of the output path.

[0128] In the output path, currency bills are positively guided alongthe flat section 274 by means of a transport roller arrangement whichincludes a pair of axially spaced, positively driven transport rollers301, 302 which are respectively disposed on transport shafts 303 and 304supported across the sidewalls of the apparatus. The first transportroller 301 includes a pair of projecting cylindrical sections 301A, 301Bwhich preferably have a high-friction outer surface, such as by theprovision of knurling thereupon. The second transport roller 302 whichis downstream of the first roller along the flat section of thetransport path also has similar cylindrical high-friction knurledsections 302A and 302B.

[0129] The flat section 274 is provided with openings through which eachof the knurled sections of the transport rollers 301 and 302 aresubjected to counter-rotating contact with corresponding passivetransport rollers 305A, 305B, 306A and 306B. The passive rollers aremounted below the flat section 274 of the transport path in such amanner as to be freewheeling about their axes and biased intocounter-rotating contact with the corresponding knurled sections of thefirst and second transport rollers. While any appropriate mechanicalsuspending and pressuring arrangement may be used for this purpose, inthe illustrative embodiment passive rollers 305A and 306A are biasedinto contact with knurled sections 301A and 302B by means of an H-shapedleaf spring 307. The rollers are cradled in a freewheeling fashionwithin each of the two cradle sections of the spring through a supportshaft (not shown) appropriately suspended about the spring. Thearrangement is such that the leaf spring 307 is mounted relative to thepassive rollers 305A and 306A in such a way that a controllable amountof pressure is exerted against the rollers and pushes them against theactive rollers 301 and 302. A similar leaf spring/suspension arrangementis used to mount the other set of passive rollers 305B and 306B intospring-loaded. freewheeling counter-rotating contact with the knurledsections 301B and 302B of the active transport rollers 301 and 302.

[0130] Preferably, the points of contact between the active and passiverollers are made coplanar with the output path so that currency billscan be moved or positively guided along the path in a flat manner underthe positive contact of the opposingly disposed active and passiverollers.

[0131] The distance between the two active transport rollers and, ofcourse, the corresponding counter-rotating passive rollers, is selectedto be just short of the length of the narrow dimension of the currencybills that are to be discrimination. Accordingly, currency bills arefirmly gripped under uniform pressure between the two sets of active andpassive rollers within the scanhead are thereby minimizing thepossibility of bill skew and enhancing the reliability of the overallscanning and recognition process.

[0132] The first active transport roller 301 is driven at a speedsubstantially higher than that of the capstan rollers in the feedsection. Since the passive rollers are freewheeling and the activerollers are positively driven, the first transport roller 301 causes abill that comes between the roller and its corresponding passive rollers305A, 305B along the flat section of the output path to be pulled intothe nip formed between the active and passive rollers (morespecifically, between these passive rollers and the correspondingknurled sections 301A, 301B on the active transport roller). The higherspeed of the active transport roller imparts an abrupt acceleration tothe bill which strips the bill away from any other bills that may havebeen guided into the curved guideway along with the particular billbeing acted upon by the transport roller.

[0133] Currency bills are subsequently moved downstream of the firsttransport roller along the flat section into the nip formed between theknurled sections 302A, 302B on the second active transport roller 302and the corresponding passive rollers 306A, 306B with the second activetransport roller being driven at the same speed as that of the firsttransport roller.

[0134] The disposition of the second transport roller is selected to besuch that the positive contact exerted by the cylindrical knurledsections 302A, 302BA on the second transport roller 302 and thecorresponding passive rollers 306A, 306B upon a currency bill movingalong the output path occurs before the bill is released from thesimilar positive contact between the knurled sections 301A, 301B on thefirst transport roller 301 and the corresponding passive rollers 305A,305B. As a result, the second transport roller 302 and its correspondingpassive rollers 306A, 306B together positively guide a currency billthrough the scanhead area (where the transport rollers are located) ontothe stacker platform 235, from where the stacker wheels 238, 240 pick upthe bill and deposit it onto the stacker place 242.

[0135] Bills are held flat against the scanhead 18 by means of aplurality of O-rings 308 which are disposed in corresponding grooves 309on the transport rollers 301 and 302. In a preferred arrangement, fivesuch O-rings 308A-E are used, one at each end of the transport rollersand three in the central regions of the rollers.

[0136] The positive guiding arrangement described above is advantageousin that uniform guiding pressure is maintained upon bills as they aretransported through the optical scanhead area; more importantly, this isrealized without adding significantly to mechanical complexity. Ineffect, the bill feeding operation is made stable, and twisting orskewing of currency bills is substantially reduced. This positive actionis supplemented by the use of the H-spring for uniformity biasing thepassive rollers into contact with the active rollers so that billtwisting or skew resulting from differential pressure applied to thebills along the transport path is avoided. The O-rings 308 function assimple, yet extremely effective means for ensuring that the bills areheld flat. Since the O-rings constitute standard off-the shelf items,any adjustment of the center distance between the two active transportrollers can be conveniently accommodated.

[0137] Referring now in particular to FIGS. 14 and 15, there are shownside and top views, respectively, of the document processing apparatusof FIGS. 11-13, which illustrate the mechanical arrangement for drivingthe various means for transporting currency bills along the threesections of the transport path, i.e., along the input path, the curvedguideway and the output path. As shown therein, a motor 320 is used toimpart rotational movement to the capstan shaft 249 by means of abelt/pulley arrangement comprising a pulley 321 provided on the CAPSTANshaft 249 and which is linked to a pulley 322 provided on the motordrive shaft through a belt 323. The diameter or the driver pulley 321 isselected to be appropriately larger than that of the motor pulley 322 inorder to achieve the desired speed reduction from the typically highspeed at which the motor 320 operates.

[0138] The drive shaft 247 for the drive roller 246 is provided withrotary motion by means of a pulley 324 provided thereupon which islinked to a corresponding pulley 321 provided on the capstan shaft 249through a belt 326. The pulleys 324 and 321 are of the same diameter sothat the drive roller shaft 247 and, hence, the drive roller 246, rotatein unison with the capstan 248 mounted on the capstan shaft 249.

[0139] In order to impart rotational movement to the transport rollers,a pulley 327 is mounted on the transport roller shaft 287 correspondingto the first set of transport rollers and is linked to a correspondingpulley 328 on the capstan shaft 249 through a belt 329. The diameter ofthe transport roller pulley 327 is selected to be appropriately smallerthan that of the corresponding capstan pulley 328 so as to realize astepping-up in speed from the capstan rollers to the transport rollers.The second set of transport rollers mounted on the transport rollershaft 288 is driven at the same speed as the rollers on the frst set oftransport rollers bv means of a pulley 330 which is linked to thetransport pulley 327 by means of a belt 325.

[0140] As also shown in FIGS. 14 and 15, an optical encoder 299 ismounted on one of the transport roller shafts, preferably the passivelydriven transport shaft 288, for precisely tracking the lateraldisplacement of bills supported by the transport rollers in terms of therotational movement of the transport shafts, as discussed in detailabove in connection with the optical sensing and correlation techniqueof this invention.

[0141] In order to drive the stacker wheels 238 and 240, an intermediatepulley 330 is mounted on suitable support means (not shown) and islinked to a corresponding pulley 331 provided on the capstan shaft 249through a belt 332. Because of the time required for transportingcurrency bills which have been stripped from the currency stack in theinput bin through the tri-sectional transport path and onto the stackerplatform, the speed at which the stacker wheels can rotate fordelivering processed bills to the sucker plate is necessarily less thanthat of the capstan shaft. Accordingly, the diameter of the intermediatepulley 333 a is selected to be larger than that of the correspondingcapstan pulley 331 so as to realize a reduction in speed. Theintermediate pulley 333 a has an associated pulley 333 which is linkedto a stacker pulley 334 provided on the drive shaft 241 for the stackerwheels 238, 240 by means of a belt 335. In the preferred embodimentshown in FIGS. 11-15, the stacker wheels 238, 240 rotate in the samedirection as the capstan rollers. This is accomplished by arranging thebelt 335 between the pulleys 333, 334 in a “Figure-8” configurationabout an anchoring pin 336 disposed between the two pulleys.

[0142] The curved section 272 of the guideway 270 is provided on itsunderside with an optical sensor arrangement 299, including an LED 298,for performing standard currency handling operations such as counterfeitdetection using conventional techniques, doubles detection, lengthdetection, skew detection, etc. However, unlike conventionalarrangements, currency discrimination according to denomination is notperformed in this area, for reasons described below.

[0143] According to a feature of this invention, optical scanning ofcurrency bills, in accordance with the above-described improved opticalsensing and correlation technique, is performed by means of an opticalscanhead 296 which is disposed downstream of the curved guideway 270along the flat section 274 of the output path. More specifically, thescanhead 296 is located under the flat section of the output pathbetween the two sets of transport rollers. The advantage of thisapproach is that optical scanning is performed on bills when they aremaintained in a substantially flat position as a result of positivecontact between the two sets of transport rollers at both ends of thebill along their narrow dimension.

[0144] It should be understood that the above-described drivearrangement is provided for illustrative purposes only. Alternatearrangements for imparting the necessary rotational movement to generatemovement of currency bills along the tri-sectional transport path can beused just as effectively. It is important, however, that the surfacespeed of currency bills across the two sets of transport rollers begreater than the surface speed of the bills across the capstan rollersin order to achieve optimum bill separation. It is this difference inspeed that generates the abrupt acceleration of currency bills as thebills come into contact with the first set of transport rollers.

[0145] The drive arrangement may also include a one-way clutch (notshown) provided on the capstan shaft and the capstan shafts, thetransport roller shafts and the stacker wheel shafts may be fitted withfly-wheel arrangements (not shown). The combination of the one-wayclutch and the fly wheels can be used to advantage in accelerated batchprocessing of currency bills by ensuring that any bills remaining in thetransport path after currency discrimination are automatically pulledoff the transport path into the stacker plate as a result of theinertial dynamics of the fly wheel arrangements.

[0146] As described above, implementation of the optical sensing andcorrelation technique of this invention requires only a relatively lownumber of reflectance samples in order to adequately distinguish betweenseveral currency denominations. Thus, highly accurate discriminationbecomes possible even though currency bills are scanned along theirnarrow dimension. However, the accuracy with which a denomination isidentified is based on the degree of correlation between reflectancesamples on the test pattern and corresponding samples on the storedmaster patterns. Accordingly, it is important that currency bill betransported across the discrimination means in a flat position and, moreimportantly, at a uniform speed.

[0147] This is achieved in the bill handling apparatus of FIGS. 11-15,by positioning the optical scanhead 296 on one side of the flat section274 of the output path between the two sets of transport rollers. Inthis area, currency bills are maintained in positive contact with thetwo sets of rollers, thereby ensuring that the bills move across thescanhead in a substantially flat fashion. Further, a uniform speed ofbill movement is maintained in this area because the second set ofpassive transport rollers is driven at a speed identical to that of theactive transport rollers by means of the drive connection between thetwo sets of rollers. Disposing the optical scanhead 296 in such afashion downstream of the curved guideway 270 along the flat section 274maintains a direct correspondence between reflectance samples obtainedby the optically scanning of bills to be discriminated and thecorresponding samples in the stored master patterns.

[0148] According to a preferred embodiment, the optical scanheadcomprises a plurality of light sources acting in combination touniformly illuminate light strips of the desired dimension upon currencybills positioned on the transport path below the scanhead. Asillustrated in FIGS. 17-18, the scanhead 296 includes a pair of LEDs340, 342, directing beams of light 341A and 343B, respectively, onto theflat section 274 of the output path against which the scanhead ispositioned. The LEDs 340, 342 are angularly disposed relative to thevertical is Y in such a way that their respective light beams combine toilluminate the desired light strip. The scanhead 296 includes aphotodetector 346 centrally disposed on an axis normal to theilluminated strip for sensing the light reflected off the strip. Thephotodetector 346 is linked to a central processing unit (CPU)(notshown) for processing the sensed data in accordance with theabove-described principles of this invention. Preferably, the beams oflight 340A, 340B from the LEDs 340, 342, respectively, are passedthrough an optical mask 345 in order to realize the illuminated stripsof the desired dimensions.

[0149] In order to capture reflectance samples with high accuracy, it isimportant that the photodetector capture reflectance data uniformityacross the illuminated strip. In other words, when the photodetector 346is positioned on an axis passing through the center of the illuminatedstrip, the illumination by the LED's as a function of the distance fromthe central point “0” along the X axis, should optimally approximate astep function as illustrated by the curve A in FIG. 19. With the use ofa single light source angularly displaced relative to the vertical, thevariation in illumination by an LED typically approximates a Gaussianfunction, as illustrated by the curve B in FIG. 19.

[0150] In accordance with a preferred embodiment, the two LEDs 340 and342 are angularly disposed relative to the vertical axis by angles α andβ, respectively. The angles α and β are selected to be such that theresultant strip illumination by the LED's is as close as possible to theoptimum distribution curve A in FIG. 19. According to a preferredembodiment, the angles α and β are each selected to be 19.9 degrees. TheLED illumination distribution realized by this arrangement isillustrated bv the curve designated as “C” in FIG. 19 which effectivelymerges the individual Gaussian distributions of each light source toyield a composite distribution which sufficiently approximates theoptimum curve A.

[0151] The manner in which the plurality of light strips of differentdimensions are generated by the optical scanhead by means of an opticalmask is illustrated in FIGS. 16-18. As shown therein, the optical mask345 essentially comprises a generally opaque area in which two slits 354and 356 are formed to allow light from the light sources to pass throughso as to illuminate it strips of the desired dimensions. Morespecifically, slit 354 corresponds to the wide strip used for obtainingthe reflectance samples which correspond to the characteristic patternfor a test bill. In a preferred embodiment, the wide slit 354 has alength of about 0.500″ and a width of about 0.050″. The second slit 356forms a relatively narrow illuminated strip used for detecting the thinborderline surrounding the printed indicia on currency bills, asdescribed above in detail. In a preferred embodiment, the narrow slit356 has a length of about 0.300″ and a width of about 0.010″.

[0152] It is preferred that a separate pair of light sources 340 and 342be provided for each of the two slits 354 and 356. Thus, as can be seenin FIGS. 17 and 18, a first pair of LED'S 340A and 342A are provided forthe narrow slit, and a second pair of LED's 340B and 342B are providedfor the second slit. Similarly, two separate photodetectors 346A and346B are provided for detecting reflected light from the two slits. Ascan be seen in FIGS. 17 and 18, the channel for transmitting reflectedlight from the narrow slit to the photodetector 346A is narrower in thetransverse direction than the channel for transmitting reflected lightfrom the wide slit to the photodetector 346B.

[0153] According to another feature of the present invention, theundesired doubling or overlapping of bills in the transport system isdetected by the provision of a pair of optical sensors which areco-linearly disposed opposite to each other within the scan head areaalong a line that is perpendicular to the direction of bill flow i.e.,parallel to the edge of test bills along their wide dimensions as thebills are transported across the optical scanhead. As best illustratedin FIG. 20, the pair of optical sensors S1 and S2 (having correspondinglight sources and photodetectors which are not shown here) areco-linearly disposed within the scan head area in close parallelism withthe wide dimension edges of incoming test bills. In effect, the opticalsensors S1 and S2 are disposed opposite each other along a line withinthe scan head area which is perpendicular to the direction of bill flow.

[0154] It should be noted that FIGS. 11, 13 and 15 also include anillustration of the physical disposition of the sensors S1 and S2 withinthe optical scanhead area of the currency recognition and countingapparatus. For purposes of clarity, the sensors S1 and S2 arerepresented only in the form of blocks which correspond to the lightsources associated with the sensors. Although not illustrated in thedrawings, it should be noted that corresponding photodetectors (notshown) are provided within the scanhead area in immediate opposition tothe corresponding light sources and underneath the flat section of thetransport path. These detectors detect the beam of coherent lightdirected downwardly onto the bill transport path from the light sourcescorresponding to the sensors S1 and S2 and generate an analog outputwhich corresponds to the sensed light. Each such output is convertedinto a digital signal by a conventional ADC convertor unit (not shown)whose output is fed as a digital input to and processed by the systemCPU (not shown), in a manner similar to that indicated in thearrangement of FIG. 1.

[0155] The presence or a bill which passes under the sensors S1 and S2causes a change in the intensity of the detected light, and thecorresponding change in the analog output of the detectors serves as aconvenient means for density-based measurements for detecting thepresence of “doubles” (two or more overlaid or overlapped bills) duringthe currency recognition and counting process. For Instance, the sensorsmay be used to collect a predefined number of density measurements on atest bill, and the average density value for a bill may be compared topredetermined density thresholds (based for instance, on standardizeddensity readings for master bills) to determine the presence of overlaidbills or doubles.

[0156] A routine for using the outputs of the two sensors S1 and S2 todetect any doubling or overlapping of bills is illustrated in FIG. 21.This routine starts when the denomination of a scanned bill has beendetermined at step 401, as described previously. To permit variations inthe sensitivity of the density measurement, a “density setting choice”is retrieved from memory at step 402. The operator makes this choicemanually, according to whether the bills being scanned are new bills,requiring only a high degree of sensitivity, or used bills, requiring alower level of sensitivity. After the “density setting choice” has beenretrieved, the system then proceeds through a series of steps whichestablish a density comparison value according to the denomination ofthe bill. Thus, step 403 determines whether the bill has been identifiedas a $20-bill, and if the answer is affirmative, the $20- densitycomparison value is retrieved from memory at step 404. A negative answerat step 403 advances the system to step 405 to determine whether thebill has been identified as a $100-bill, and if the answer isaffirmative, the $100-bill density comparison value is retrieved frommemory at step 406. A negative answer at step 405 advances the system tostep 407 where a general density comparison value, for ail remainingbill denominations, is retrieved from memory.

[0157] At step 408, the density comparison value retrieved at step 404,406 or 407 is compared to the average density represented by the outputof sensor S1. The result of this comparison is evaluated at step 409 todetermine whether the output of sensor S1 identifies a doubling of billsfor the particular denomination of bill determined at step 401. If theanswer is negative, the system returns to the main program. If theanswer is affirmative, step 410 then compares the retrieved densitycomparison value to the average density represented by the output of thesecond sensor S2. The result of this comparison is evaluated at step 401to determine whether the output of sensor S2 identifies a doubling ofbills. Affirmative answers at both step 409 and step 411 results in thesetting of a “doubles error” flag at step 412, and the system thenreturns to the main program. The “doubles error” flag can, of course, beused to stop the bill transport motor.

[0158]FIG. 22 illustrates a routine that enables the system to detectbills which have been badly defaced bv dark marks such as ink blotches,felt-tip pen marks and the like. Such severe defacing of a bill canresult in such distorted scan data that the data can be interpreted toindicate the wrong denomination for the bill Consequently, it isdesirable to detect such severely defaced bills and then stop the billtransport mechanism so that the bill in question can be examined by theoperator.

[0159] The routine of FIG. 22 retrieves each successive data sample atstep 450 and then advances to step 451 to determine whether that sampleis too dark. As described above, the output voltage from thephotodetector 26 decreases as the darkness of the scanned areaincreases. Thus, the lower the output voltage from the photodetector,the darker the scanned area. For the evaluation carried out at step 451,a preselected threshold level for the photodetector output voltage, suchas a threshold level of about 1 volt, is used to designate a sample thatis “too dark.”

[0160] An affirmative answer at step 451 advances the system to step 452where a “bad sample” count is incremented by one. A single sample thatis too dark is not enough to designate the bill as seriously defaced.Thus, the “bad sample” count is used to determine when a preselectednumber of consecutive samples, e.g, ten consecutive samples, aredetermined to be too dark. From step 452, the system advances to step453 to determine whether ten consecutive bad samples have been received.If the answer is affirmative, the system advances to step 454 where anerror flag is set. This represents a “no call” condition, which causesthe bill transport system to be stopped in the same manner discussedabove in connection with FIG. 8A.

[0161] When a negative response is obtained at step 451, the systemadvances to step 455 where the “bad sample” count is reset to zero, sothat this count always represents the number of consecutive bad samplesreceived. From step 455 the system advances to step 456 which determineswhen all the samples for a given bill have been checked. As long as step456 yields a negative answer, the system continues to retrievesuccessive samples at step 450. When an affirmative answer is producedat step 456, the system returns to the main program at step 457.

[0162] It is desirable to maintain a predetermined space between eachpair of successive bills to facilitate the resetting of the scanningsystem between the trailing edge of the scanned area on one bill and theleading borderline on the next bill. The routine for performing thisspacing check is illustrated in FIG. 23. This routine begins with step500, which checks the output signals from the sensors S1 and S2 todetermine when the leading edge of a bill is detected by either sensor.The detection of a predetermined change in the output from either sensorS1 or S2 advances the system to step 501, which determines whether thedetected output change is from the first sensor to see the leading edgeof a bill. If the answer is affirmative the system returns to the mainprogram at step 503. A negative response at step 501 advances the systemto step 504 to determine whether the spacing check is done yet. If theanswer is “yes,” the system returns to the main program. If the answeris “no,” step 505 determines whether a spacing check is to be performed,based on whether the first bill in a new stack of bills placed in theCRU has been detected. That is, there is no need to initiate a spacingcheck until the first bill reaches the sensors S1 and S2. Thus, anegative answer at step 505 returns the system to the main program,while an affirmative answer advances the system to step 506 whichcompares the actual spacing count, i.e., the number of encoder pulsesproduced after detection of the leading edge of the bill, to apreselected minimum spacing count retrieved from memory. If the actualspacing count is above the preselected minimum, there is no error andconsequently the next step 507 yields a negative response, indicatingthat there is no spacing error. Thi negative response sets a “spacingerror checked” flag at step 509. If the actual spacing count is belowthe preselected minimum, step 509 detects a spacing error andconsequently produces an affirmative response which sets an error flagat step 508. The system then returns to the main program at step 503. Itis this flag that is read at step 504.

[0163] A routine for automatically monitoring and making any necessarycorrections in various line voltages is illustrated in FIG. 24. Thisroutine is useful in automatically compensating for voltage drifts dueto temperature changes, aging of components and the like. The routinestars at step 550 which reads the output or a line sensor which ismonitoring a selected voltage. Step 551 determines whether the rehang isbelow 0.60, and if the answer is affirmative, step 552 determineswhether the reading is above 0.40. If step 552 also produces anaffirmative response, the voltage is within the required range and thusthe system returns to the main program step 553. If step 551 produces anegative response, an incremental correction is made at step 554 toreduce the voltage in an attempt to return it to the desired range.Similarly, if a negative response is obtained at step 552, anincremental correction is made at step 555 to increase the voltagetoward the desired range.

1. A currency counting and evaluation device for receiving a stack ofcurrency bills, rapidly counting and evaluating all the bills in thestack, and then re-stacking the bills, said device comprising a feedmechanism for receiving a stack of currency bills and feeding said billsin the direction of the narrow dimension of the bills, one at a time, toa feed station, a bill transport mechanism for transporting bills, inthe direction of the narrow dimension of the bills, from said feedstation to a stacking station, at a rate in excess of about 800 billsper minute. a stationary optical scanning head located between said feedand stacking stations for scanning a preselected segment of a centralportion of each bill transported between said stations by said transportmechanism, said scanning head including at least one light source forilluminating a strip of said preselected segment of a bill, and at leastone detector for received reflected light from the illuminated strip onthe bill and producing an output signal representing variations in theintensity of the reflected light, sampling said output signalpreselected intervals as a bill is moved across said scanning head inthe direction of the narrow dimension of the bill, a memory for storingcharacteristic signal samples produced by scanning said preselectedsegments of bills of different denominations with said scanning head andsampling said output signal at said preselected intervals, and signalprocessing means for receiving said signal samples and (1) determiningthe denomination of each scanned bill by comparing said stored signalsamples with said output signal samples produced by the scanning of eachbill with said scanning head, (2) counting the number of scanned billsof each denomination, and (3) accumulating the cumulative value of thescanned bills of each denomination.
 2. The currency counting andevaluation device of claim 1 which includes an encoder coupled to saidtransport mechanism for monitoring the movement of each bill byproducing a repetitive tracking signal synchronized with incrementalmovements of said transport mechanism, and means urging each bill intofirm engagement with said transport mechanism and said scanning head toensure a fixed relationship between the increments of movement of eachbill and the corresponding increments of movement of said transportmechanism which is synchronized with said encoder.
 3. The currencycounting and evaluation device of claim 1 wherein said transportmechanism is driven at a controllable speed.
 4. The currency countingand evaluation device of claim 1 wherein said detector in said scanninghead is a single photodetector which produces an electrical outputsignal proportional to the intensity of the light reflected from thescanned bill.
 5. The currency counting and evaluation device of claim 4which includes means for sampling said output signal at incrementssynchronized with said repetitive tracking signal, and at the sameincrements used in said characteristic signals stored in said memory. 6.The currency counting and evaluation device of claim 1 wherein saidstrips are dimensioned so that at least 50 different strips can bescanned in the direction of the narrow dimension of each bill.
 7. Thecurrency counting and evaluation device of claim 1 which includes meansfor detecting a borderline around the image printed on each bill, andwherein said preselected segment is located inside said borderline, andthe scanning of said preselected segment is initiated at a prescribedinterval following the detection of said borderline.
 8. The currencycounting and evaluation device of claim 1 wherein said preselectedsegment of each bill is located in the central region of the bill. 9.The currency counting and evaluation device of claim 1 wherein saidfeeding and stacking stations are both located at the front of saiddevice, and said transport mechanism carries bills rearwardly away fromsaid feed station and then returns the bills forwardly to said stackingstation.
 10. The currency counting and evaluation device of claim 9wherein said transport mechanism forms a linear path for said bills onthe upstream side of said stacking station, and said scanning head islocated along said linear path.
 11. The currency counting and evaluationdevice of claim 1 wherein said preselected segment of each bill isscanned in less than one tenth of a second.
 12. The currency countingand evaluation device of claim 1 wherein said light source illuminatessaid preselected segment of each bill from opposite sides of saiddetector.
 13. The currency counting and evaluation device of claim 1which includes means for controlling the movement of a selected billbetween said scanning head and the stacking station for that bill inresponse to said determination of the denomination of that bill.
 14. Thecurrency counting and evaluation device of claim 13 wherein saidcontrolling means stops the movement of said selected bill between saidscanning head and the stacking station for that bill.
 15. The currencycounting and evaluation device of claim 13 wherein said controllingmeans decelerates said selected bill before stopping the movement ofthat bill.
 16. The currency counting and evaluation device of claim 1wherein the denomination of each bill is determined before the leadingedge of that bill reaches the stacking station for that bill.
 17. Thecurrency counting and evaluation device of claim 1 wherein said stackingstation is spaced from said scanning head by a distance that is lessthan the width of two of said bills.
 18. The currency counting andevaluation device of claim 1 which includes signal processing meansresponsive to the output signals from said detector for determining thedenomination of each scanned bill before that bill has been advanced toa stacking station, and means responsive to said signal proceeding meansfor altering the movement of a scanned bill in response to thedenomination detection for that bill, before that bill is advanced to astacking station.
 19. An improved method for discriminating betweencurrency bills of different denominations, each currency bill havingprinted indicia enclosed within a borderline defined thereupon so thatthe bill surface outside the borderline is substantially blank,comprising the steps of: illuminating a predetermined section of acurrency bill by focusing at least one strip of coherent lightthereupon; detecting the light reflected off said illuminated section ofsaid bill to generate an analog reflectance signal; generating relativelateral displacement between said strip of coherent light and saidcurrency bill so as to illuminate or optically scan successive sectionsof said bill along a predetermined dimension thereof and enclosed withinsaid borderline; obtaining a series of analog reflectance signalscorresponding to light reflected from each of said successive billsections using a first relatively narrow strip of coherent light todetect said borderline as the currency bill moves across said strip bydetecting the difference in magnitude of the reflectance signal obtainedfrom the bill surface outside said borderline and the reflectance signalobtained about said borderline itself, and using a second relativelywide strip of coherent light to obtain said reflectance signalsrepresenting said characteristic patterns after said borderline has beendetected; digitizing and processing said series of analog reflectancesignals to yield a set of digital data samples which, in combination,represent a data pattern characteristic of the currency denomination ofsaid bill; generating and storing a set of master characteristicpatterns corresponding to optical scanning of original bills of each ofthe different currency denominations to be discriminated; and comparingthe characteristic pattern or a scanned currency bill to each of saidstored master patterns to determine the degree of correlationtherebetween, and thereby to identify the denomination of said currencybill.
 20. An improved method for discriminating between currency billsof different denominations comprising the steps of: illuminating apredetermined section of a currency bill by focusing at least one stripof coherent light thereupon; detecting the light reflected off saidilluminated section of said bill to generate an analog reflectancesignal; generating relative lateral displacement between said strip ofcoherent light and said currency bill so as to illuminate or opticallyscan successive sections of said bill along a predetermined dimensionthereof; obtaining a series of analog reflectance signals correspondingto light reflected from each of said successive bill sections;digitizing and processing said series of analog reflectance signals toyield a set of digital data samples which, in combination, represent adata pattern characteristic of the currency denomination of said bill;generating and storing a set of master characteristic patternscorresponding to optical scanning of original bills of each of thedifferent currency denominations to be discriminated; comparing thecharacteristic pattern for a scanned currency bill to each of saidstored master patterns to determine the degree of correlationtherebetween, and thereby to identify the denomination of said currencybill; and positively identifying said scanned bill as having thedenomination corresponding to the stored master pattern which the degreeof correlation is found to be the highest and at least equal to apredefined correlation threshold.
 21. The improved currency discretionmethod according to claim 20 wherein any scanned bill which is notpositively identified as having a particular currency denomination isidentified as having an unidentifiable denomination.
 22. Improvedapparatus for discriminating and counting currency bills of differentdenominations comprising: an input path for receiving currency bills tobe discriminated and along which bills may be moved along a firstdirection; an output path along which bills may be moved along a seconddirection; a curved guideway disposed between said input and outputpaths and for accepting bills from said input path and guiding themalong said second direction onto said output path; and currencydiscrimination means located downstream of said curved guideway alongsad output path where said bills are guided in a substantially straightmanner.
 23. The improved currency discrimination apparatus as set forthin claim 22 wherein said currency discrimination means includes: meansfor illuminating a predetermined section of a currency bill by focusingat least one strip of coherent light thereupon; means for detecting thelight reflected off said illuminated section of said bill at selectedtime intervals as the bill is moved across said light strip in order togenerate a series of analog reflectance signals; means for digitizingand processing said reflectance signals to yield a set of digitalsamples which, in combination, represent a data pattern characteristicof the currency denomination of said bill; means for generating andstoring a set of master characteristic patterns corresponding to opticalscanning of original bills of each of the currency denominations to bediscriminated; and means for comparing the characteristic pattern for ascanned currency bill to each of said stored master patterns todetermine the degree of correlation therebetween, and thereby toidentify the denomination of said currency bill.
 24. The improvedcurrency discrimination apparatus as set forth in claim 22 whereincurrency bills having a wide dimension and a narrow dimension are movedalong said input path, along said curved guideway, and along said outputpath with their narrow dimension maintained substantially parallel tothe direction of movement.
 25. The improved currency discriminationapparatus as set forth in claim 23 wherein said currency bills haveprinted indicia characterizing bill denomination, said indicia beingenclosed by a borderline defined thereupon, the bill surface outsidesaid borderline being substantially blank, and further wherein saidcurrency discrimination means generates said characteristic patterns byobtaining said reflectance signals from the bill surface containedwithin said borderline.
 26. The improved currency discriminationapparatus as set forth in claim 25 wherein said currency discriminationmeans includes means for focusing a first relatively narrow strip ofcoherent light onto said currency bills in order to detect saidborderline as the currency bills move across said strip by detecting thedifference in magnitude of the reflectance signal obtained from the billsurface outside said borderline and the reflectance signal obtainedabout said borderline itself.
 27. The improved currency discriminationapparatus as set forth in claim 26 wherein said currency discriminationmeans includes means for focusing a second relatively wide strip ofcoherent light upon said currency bills for obtaining said reflectancesignals representing said characteristic patterns after said borderlinehas been detected using said narrow strip of light.